package com.liaowei.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liaowei.model.domain.Post;
import com.liaowei.model.domain.UserPostHistory;
import com.liaowei.model.param.PostHistoryParam;
import com.liaowei.user.model.param.PagePostHistoryParam;

import java.util.List;

/**
* @author LindaMan
* @description 针对表【wy_user_post_history(用户浏览帖子历史表)】的数据库操作Service
* @createDate 2023-05-01 17:19:40
*/
public interface UserPostHistoryService extends IService<UserPostHistory> {

    // 新增帖子历史记录
    String addPostHistory(PostHistoryParam postHistoryParam);

    // 根据用户id和帖子id删除帖子记录
    String removePostHistoryByUserIdAndPostId(Long userId, Long postId);

    // 分页查询自己的帖子历史记录
    List<Post> searchPostHistoryPage(PagePostHistoryParam historyParam);

    // 根据userId删除全部的帖子历史记录
    String removeAllPostHistoryByUserId(long userId);

}